package manager

import (
	kubetoolsapiv1alpha1 "gitee.com/YunFeiGuoJi/kubetools/apis/kubetools/v1alpha1"
	kubetoolsclientset "gitee.com/YunFeiGuoJi/kubetools/clients/clientset/versioned"
	"gitee.com/YunFeiGuoJi/kubetools/pkg/connector"
	"gitee.com/YunFeiGuoJi/kubetools/pkg/util/runner"
	log "github.com/sirupsen/logrus"
)

// Manager defines all the parameters needed for the installation.
type Manager struct {
	ObjName            string
	Cluster            *kubetoolsapiv1alpha1.ClusterSpec
	Logger             log.FieldLogger
	Connector          connector.Connector
	Runner             *runner.Runner
	AllNodes           []kubetoolsapiv1alpha1.HostCfg
	EtcdNodes          []kubetoolsapiv1alpha1.HostCfg
	MasterNodes        []kubetoolsapiv1alpha1.HostCfg
	WorkerNodes        []kubetoolsapiv1alpha1.HostCfg
	K8sNodes           []kubetoolsapiv1alpha1.HostCfg
	EtcdContainer      bool
	ClusterHosts       []string
	WorkDir            string
	KsEnable           bool
	KsVersion          string
	Debug              bool
	SkipCheck          bool
	SkipPullImages     bool
	SourcesDir         string
	AddImagesRepo      bool
	InCluster          bool
	DeployLocalStorage bool
	Kubeconfig         string
	Conditions         []kubetoolsapiv1alpha1.Condition
	ClientSet          *kubetoolsclientset.Clientset
	DownloadCommand    func(path, url string) string
}

// Copy is used to create a copy for Manager.
func (mgr *Manager) Copy() *Manager {
	newManager := *mgr
	return &newManager
}
